#pragma once

#include <string>
#include <iostream>
#include <string.h>
#include "../objects/Entity.h"
/*

 Decision Tree class

 Used for building complete decision tree. Each node of tree will have ID for getDecision function
 located inside of entity using decision tree system. Overriding of function to perform evaluate operation
 for ID. Output will be represented by status which unit should perform after making decision(eg. Hunt, wander, go home and so).


 */
class DecisionTree
{
public:
	DecisionTree(DecisionTree *_root, Entity *_entity, bool _final,
			unsigned int id);
	DecisionTree(Entity *_entity, bool _final, unsigned int id);
	~DecisionTree(void);

	unsigned int getDecision();
	unsigned int getUnitDecision(unsigned int id);
	void setYes(DecisionTree *_yes);
	void setNo(DecisionTree *_no);
	DecisionTree* getYes();
	DecisionTree* getNo();

private:
	unsigned int id;
	Entity *entity;
	DecisionTree *root;
	DecisionTree *yes;
	DecisionTree *no;
	bool final;

};

